DominantColor

data class DominantColor(val r: Float, val g: Float, val b: Float, val weight: Float)

A single color extracted from the rendered appearance of a block.

Parameters

r

red component in sRGB, normalized to the range 0, 1.

g

green component in sRGB, normalized to the range 0, 1.

b

blue component in sRGB, normalized to the range 0, 1.

weight

share of analyzed pixels represented by this color, in the range 0, 1. Higher values indicate a more prominent color. The sum of weights returned by a single BlockApi.getDominantColors call is 1.

Constructors

Link copied to clipboard
constructor(r: Float, g: Float, b: Float, weight: Float)

Properties

Link copied to clipboard
val b: Float
Link copied to clipboard
val g: Float
Link copied to clipboard
val r: Float
Link copied to clipboard